package com.huawei.esdk.uc.device;

import java.lang.reflect.Proxy;

import com.huawei.esdk.platform.nemgr.base.MultiConnDeviceBase;
import com.huawei.esdk.uc.device.base.UCDeviceConnectionBase;

public class U19Connection extends UCDeviceConnectionBase
{
    
    private MultiConnDeviceBase device;
    
    public U19Connection(MultiConnDeviceBase serviceProxy)
    {
        super(null, null);
        this.device = serviceProxy;
    }
    
    @Override
    public Object getServiceProxy(Class<?>[] itfs)
    {
        return Proxy.newProxyInstance(this.getClass().getClassLoader(), itfs, device.getService(itfs));
    }
    
    @Override
    public boolean doHeartbeat(String connId)
    {
        return true;
    }
    
    @Override
    public boolean initConn(String connId)
    {
        return true;
    }
    
    @Override
    public void destroyConn(String connId)
    {
        return;
    }
    
    @Override
    public int getKeepAliveTimes()
    {
        return 0;
    }
    
    @Override
    public int getKeepAlivePeriod()
    {
        return 9 * 60;
    }
}
